Gradle Essentials by Kunal Dabir & Abhinandan

Gradle Essentials by Kunal Dabir & Abhinandan

Author:Kunal Dabir & Abhinandan, [Dabir, Kunal]
Language: eng
Format: epub, azw3
Publisher: Packt Publishing
Published: 2015-12-22T23:00:00+00:00


Another look at applying plugins

Now that we have learned about basic Groovy, let's put it to use in the context of the Gradle build script. In earlier chapters, we have already seen the syntax of applying a plugin. It looked something as follows:

apply plugin: 'java'

If we look carefully, apply is a method call. We can wrap the parameters in the parenthesis:

apply(plugin: 'java')

A method that takes in a map can pass key values just like named arguments. However, for a more clear representation of Map, we can wrap the parameters in []:

apply([plugin: 'java'])



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.